package com.eshop.we.controller;

import com.eshop.we.banner.entity.Banner;
import com.eshop.we.business.BannerBusiness;
import com.eshop.we.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangzhanguo
 * @create 2018-06-05 10:54
 **/
@RestController
@RequestMapping("/banner")
public class BannerController extends BaseController{
    @Autowired
    private BannerBusiness bannerBusiness;

    @RequestMapping("/list")
    public Result list(){
        List<Banner> banners = bannerBusiness.selectAllOrderSort();
        return Result.success(banners);
    }

}
